package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketCart;
import com.cskaoyan.bean.MarketCartExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface MarketCartMapper {
    long countByExample(MarketCartExample example);

    int deleteByExample(MarketCartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketCart record);

    int insertSelective(MarketCart record);

    List<MarketCart> selectByExample(MarketCartExample example);

    MarketCart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketCart record, @Param("example") MarketCartExample example);

    int updateByExample(@Param("record") MarketCart record, @Param("example") MarketCartExample example);

    int updateByPrimaryKeySelective(MarketCart record);

    int updateByPrimaryKey(MarketCart record);

    List<MarketCart> selectCountByUserId(Integer userId);

    int insertGoods(MarketCart marketCart);

    int selectCount(Integer userId);

    List<MarketCart> selectByUserId(Integer userId);

    void updateCheckedByExample(@Param("checked") Boolean isChecked,@Param("example") MarketCartExample marketCartExample);

    void updateNum(@Param("id") Integer id, @Param("number") Integer number);

    void updateDeleted(Integer id);

    void updateDeletedByExample(@Param("example") MarketCartExample marketCartExample);

    MarketCart selectByUserIdAndGoodsId(@Param("userid") Integer userId, @Param("goodsid") Integer goodsId);

    List<MarketCart> selectAllChecked(Integer userId);

    MarketCart selectOneByExample(MarketCartExample example);

    int selectGoodsIdCount(@Param("userid") Integer userId,@Param("productId") Integer productId);

    void updateNumAndChecked(@Param("productId")Integer productId, @Param("number") Integer number);

    int selectCurNum(@Param("userid") Integer userId,@Param("productId") Integer productId);
}